header = {
   frame  = {4096, 3072};
   window = {800, 600};
   checkspan = 1 / 30.0;
   hoseispan = 0.6;
   bindingbox = {0, 0, 4096, 3072};
}

input = {
   joystick = {
      id = 0;
      hosei = 0.025;
   };
   doubleclickspan = 2.0 / 3;
}

pfont = {
   ----texture = "data/hgrpp2210.png";
   texture = "data/hgrpp1011.png";
   --texture = "data/deja47.png";
   --texture = "data/hgrkk0.png";
   --texture = "data/hgrpp109.png";

   simple = "data/deja47.png";
}

texture = {
   title        = "data/title.png";
   boost        = "data/boost.png";
   jump         = "data/jump.png";
   itembox      = "data/itembox.png";

   item_boost   = "data/item_boost.png";
   item_boost_2 = "data/item_boost_2.png";
   item_boost_3 = "data/item_boost_3.png";

   item_missile   = "data/item_missile.png";
   item_missile_3 = "data/item_missile_3.png";
   item_missile_5 = "data/item_missile_5.png";

   item_tracer    = "data/item_tracer.png";
   item_tracer_3  = "data/item_tracer_3.png";

   item_hitman     = "data/item_hitman.png";
   item_hitman_all = "data/item_hitman_all.png";

   item_mine    = "data/item_mine.png";
   item_mine_5  = "data/item_mine_5.png";
}

http = {
   port = 9000;
}

water = {
   dospan = 0.0333333;
   updatespan = 0.01666666;
}

--stagepath = {"data/stage = data/stage.zip = stage"}
stagepath = {"boatrace/stage"}

stagefiles = {}

--------------------------------------------------------------------------------
-- MODE:¥¿¥¤¥È¥ëÉ½¼¨
mode_title = {

   viewpriority = {
      init        = 10;
      logo        = 20;
      water       = 30;
      char        = 40;
      fps         = 70;
      update      = 80;
   };

   water = {
      width       = 640;
      height      = 480;
      speed       = 1.0;
      attenuation = 0.975;
   };

   char = {
      accel  = 1000;
      speed  = 2000;
      size = {512, 512};
      padding = 50;
      space   = 100;
      goal_distance = 8;
   };
   
   
}

--------------------------------------------------------------------------------
-- MODE:¥¹¥Æ¡¼¥¸ÁªÂò
mode_stageselect = {

   input_threshold = 0.1000;

   target = {
      size = {60, 60};
   };

   viewpriority = {
      init        = 10;
      stage       = 20;
      stageinfo   = 40;
      fps         = 70;
      update      = 80;
   };

   view_stageinfo = {
      message = {
         name     = {"Name   : %s", 48};
         target   = {"Target : %d", 48};
         length   = {"Length : %.2f", 48};
         lap      = {"Lap    : %d", 48};
      };
   };

   view_stage = {
      stagerect = {400, 300, 3600, 2700};

      field = {
         linecolor = {1.0, 1.0, 1.0, 1.0};
         backcolor = {1.0, 1.0, 1.0, 0.5};
      };

      target = {
         color = {1.0, 1.0, 1.0, 1.0};
         size  = {600, 600};
      };

      booster = {
         color = {1.0, 0.5, 0.5, 1.0};
         size  = {600, 600};
      };

      jumper = {
         color = {0.5, 1.0, 1.0, 1.0};
         size  = {600, 600};
      };

      itembox = {
         color = {0.5, 1.0, 0.5, 1.0};
         size  = {600, 600};
      };

      path = {
         linecolor = {1.0, 1.0, 1.0, 1.0};
      };
      
      targetinfo = {
         edge = {1.0, 1.0, 1.0, 1.0};
         char = {0.0, 0.0, 0.0, 1.0};
         diff = {300, 300};
         format = "¡Ú%02d¡Û";
      };

      npcrounder = {
         color = {0.25, 0.5, 0.75, 1.0};
      };

      npcbuoy = {
         color = {0.75, 1.0, 0.25, 1.0};
      };
   };

}

--------------------------------------------------------------------------------
-- MODE:¥ì¡¼¥¹
mode_race = {

   reorderspan = 1 / 2.0;
   stageReflect = 0.5;
   gravity = 980;

   objecttail = {
      number = 96;  -- for bullets
      number3 = 512; -- for racers
      texture = "data/TailTexture.png";
   };

   target = {
      size      = {120, 120};
      focusSize = {480, 480};
   };

   camera = {
      pitch  = -80;
      near   = 500;
      center = 5000;
      far    = 25000;
      shake = {
         span = 2.00;
         width = 50;
      };
   };

   water = {
      -- width       = 880;
      -- height      = 660;
      width       = 1024;
      height      = 1024;
      speed       = 1.75;
      attenuation = 0.955;
   };

   booster = {
      size = {600, 600};
   };

   itembox = {
      size = {500, 500};
   };

   jumper = {
      size = {400, 400};
   };

   player = {
      size = {100, 100};
      boost = {
         span = 1.250;
         freeze = 5.0;
         velocity = 3;
      };
      tail = {
         width = 30;
      };
      itemslot = {
         size = {90, 90};
         spanFreeze = 0.5;
         radius = 150;
      };
      jump = {
         spanFreeze = 1.250;
         span = 0.75;
      };
      strength = { -- ¿åÌÌ¤ò±ú¤Þ¤»¤ë¶¯¤µ
         normal = -1400;
         boost  = -2100;
         jump   = -4200; -- Ãå¿å»þ¤Î¶¯¤µ
      }
   };

   rival = {
      breakneargoal = {
         distance = {
            min = 1500;
            max = 1600;
         }
      };
      accel = {
         randomize = 0.3;
      };

   };

   boost = {
      inter = {
         span = 2.000;
         accel = 2500;
      };
      course = {
         span = 3.000;
         accel = 5000;
      };
      item = {
         span = 5.000;
         accel = 3500;
      };
   };

   bullet = {
      size = {100, 100};
      speed = {
         straight = 10000;
         trace = 3000;
      },
      accel = 3000;
      span = 15;
      burst = {
         size = 150;
         span = 0.8;
         strength = 6000;
      },
      tail = {
         width = 15;
      };
      initdistance = 500;
   };

   mine = {
      size = {100, 100};
      span = 45;
      burst = {
         size = 150;
         span = 1.0;
         strength = 9000;
      }
   };

   viewpriority = {
      init        = 10;
      water       = 18;
      understage  = 19;
      stage       = 20;
      substage    = 30;
      stageinfo   = 40;
      playerinfo  = 41;
      playerorder = 43;
      feedback    = -42;
      text        = -50;
      textbox     = -60;
      fps         = 70;
      update      = 80;
   };

   view_stage = {
      hoseisize = {120, 90};

      vertexbuffer = {
         bullet = {length = 1024;};
         bulletburst = {length = 1024;};
         battery = {length = 1024;};
      };

      player = {
         color = {
            normal = {1.0, 0.0, 1.0, 1.0};
            shadow = {0.0, 0.0, 0.0, 0.5};
            boost  = {0.0, 1.0, 1.0, 0.5};
         };
         boost = {
            size = {30, 50};
         }
      };

      rival = {
         color = {
            normal = {1.0, 1.0, 1.0, 1.0};
            shadow = {0.0, 0.0, 0.0, 0.5};
         }
      };

      target = {
         color = {
            normal = {1.0, 0.0, 0.0, 0.5};
            focus  = {1.0, 0.0, 0.0, 0.5};
         }
      };

      missile = {
         color = {
            normal = {0.3, 0.9, 0.7, 1.0};
            tail   = {1.0, 0.0, 1.0, 0.5};
         }
      };

      tracer = {
         color      = {0.3, 0.9, 0.7, 1.0};
      };

      hitman = {
         color      = {0.5, 0.3, 0.2, 1.0};
      };

      mine = {
         color      = {0.5, 0.25, 0.75, 1.0};
      };

      booster = {
         color      = {1.0, 0.5, 0.5, 1.0};
      };

      itembox = {
         color      = {0.5, 1.0, 0.5, 1.0};
      };

      jumper = {
         color      = {1.0, 1.0, 0.5, 1.0};
      };

      fog = {
         color      = {0.4, 0.0, 0.0, 1.0};
      };
   };

   view_understage = {
      player = {
         color = {
            normal = {1.0, 0.0, 1.0, 1.0};
            boost  = {0.0, 1.0, 1.0, 0.5};
         }
      };

      rival = {
         color = {
            normal = {1.0, 1.0, 1.0, 1.0};
         }
      };

      target = {
         color = {
            normal = {1.0, 0.0, 0.0, 0.5};
            focus  = {1.0, 0.0, 0.0, 0.5};
         }
      };

      missile = {
         color = {
            normal = {0.21, 0.63, 0.49, 1.0};
            tail   = {0.70, 0.00, 0.70, 0.5};
         }
      };

      tracer = {
         color      = {0.21, 0.63, 0.49, 1.0};
      };

      hitman = {
         color      = {0.35, 0.18, 0.52, 1.0};
      };

      mine = {
         color      = {0.35, 0.18, 0.52, 1.0};
      };

      booster = {
         color      = {0.70, 0.35, 0.35, 1.0};
      };

      itembox = {
         color      = {0.35, 0.70, 0.35, 1.0};
      };

      jumper = {
         color      = {0.70, 0.70, 0.35, 1.0};
      };
   };

   view_substage = {
      window = {409.6, 307.2};
      
      path = {
         color = {1.0, 1.0, 1.0, 0.6};
      };

      player = {
         color = {1.0, 1.0, 1.0, 1.0};
         size  = {10, 10};
      };

      target = {
         color = {
            normal = {1.0, 0.0, 0.0, 0.5};
            focus  = {1.0, 0.0, 0.0, 0.5};
         };
         size       = {6, 6};
      };

      rival = {
         color = {0.0, 1.0, 1.0, 0.5};
         size  = {8, 8};
      };
   };

   view_stageinfo = {
      message = {
         position = "player(% 8.1f, % 8.1f)";
         speed    = "speed (% 8.1f, % 8.1f)";
         target   = "target(% 8.1f, % 8.1f)";
         size     =  32;
      };
   };

   view_playerinfo = {
      target = {
         current = {
            color      = {1.0, 0.0, 1.0, 1.0};
            size       = {50, 50};
         };
         next = {
            color      = {1.0, 1.0, 0.0, 1.0};
            size       = {30, 30};
         };
      };

      rival = {
         next = {
            color      = {1.0, 0.0, 0.0, 0.5};
            size       = {100, 100};
         };
         prev = {
            color      = {0.0, 0.0, 1.0, 0.5};
            size       = {100, 100};
         };
      };

      item = {
         size = {192, 192};
      };

      circle = {
         color = {0.0, 1.0, 1.0, 1.0};
      };
   };

   view_posteffect = {
      alpha = 0.5;
   };

   view_playerorder = {
      color = {
         other = {1.0, 1.0, 1.0, 1.0};
         mine  = {1.0, 0.3, 0.3, 1.0};
      };
      format     = "%2d  %-8s %3d";
      updatespan = 1 / 5.0;
   };
}

-- ¤³¤Ã¤«¤éÀè¤ÏÆâÉô½èÍýÍÑ

function attrdir (path, files)
   for file in lfs.dir(path) do
      if file ~= "." and file ~= ".." and file ~= ".svn" and file ~= ".cvs" then
         local f = path.."/"..file
         local attr = lfs.attributes (f)
         if attr.mode == "directory" then
            attrdir (f, files)
         else
            table.insert(files, f)
         end
      end
   end
end

for _, path in ipairs(stagepath)
do
   attrdir(path, stagefiles);
end